const Cy = "3.2.1";
var Rv, Pv = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
function Nv(t) {
    var e, n, o = "";
    for (e = 0; e + 3 <= t.length; e += 3)
        n = parseInt(t.substring(e, e + 3), 16),
        o += Pv.charAt(n >> 6) + Pv.charAt(63 & n);
    for (e + 1 == t.length ? (n = parseInt(t.substring(e, e + 1), 16),
    o += Pv.charAt(n << 2)) : e + 2 == t.length && (n = parseInt(t.substring(e, e + 2), 16),
    o += Pv.charAt(n >> 2) + Pv.charAt((3 & n) << 4)); (3 & o.length) > 0; )
        o += "=";
    return o
}
const uy=[
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25,
    26,
    27,
    28,
    29,
    30,
    31,
    32,
    33,
    34,
    35,
    null,
    null,
    null,
    null,
    null,
    null,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25,
    26,
    27,
    28,
    29,
    30,
    31,
    32,
    33,
    34,
    35
]
function cy(t, e) {
    var n = uy[t.charCodeAt(e)];
    return null == n ? -1 : n
}
function iy() {
    return new Jv(null)
}
function Ov(t) {
    return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)
}
function fy(t) {
    var e, n = 1;
    return 0 != (e = t >>> 16) && (t = e,
    n += 16),
    0 != (e = t >> 8) && (t = e,
    n += 8),
    0 != (e = t >> 4) && (t = e,
    n += 4),
    0 != (e = t >> 2) && (t = e,
    n += 2),
    0 != (e = t >> 1) && (t = e,
    n += 1),
    n
}
ny = function() {
    function t(t) {
        this.m = t,
        this.mp = t.invDigit(),
        this.mpl = 32767 & this.mp,
        this.mph = this.mp >> 15,
        this.um = (1 << t.DB - 15) - 1,
        this.mt2 = 2 * t.t
    }
    return t.prototype.convert = function(t) {
        var e = iy();
        return t.abs().dlShiftTo(this.m.t, e),
        e.divRemTo(this.m, null, e),
        t.s < 0 && e.compareTo(Jv.ZERO) > 0 && this.m.subTo(e, e),
        e
    }
    ,
    t.prototype.revert = function(t) {
        var e = iy();
        return t.copyTo(e),
        this.reduce(e),
        e
    }
    ,
    t.prototype.reduce = function(t) {
        for (; t.t <= this.mt2; )
            t[t.t++] = 0;
        for (var e = 0; e < this.m.t; ++e) {
            var n = 32767 & t[e]
              , o = n * this.mpl + ((n * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
            for (t[n = e + this.m.t] += this.m.am(0, o, t, e, 0, this.m.t); t[n] >= t.DV; )
                t[n] -= t.DV,
                t[++n]++
        }
        t.clamp(),
        t.drShiftTo(this.m.t, t),
        t.compareTo(this.m) >= 0 && t.subTo(this.m, t)
    }
    ,
    t.prototype.mulTo = function(t, e, n) {
        t.multiplyTo(e, n),
        this.reduce(n)
    }
    ,
    t.prototype.sqrTo = function(t, e) {
        t.squareTo(e),
        this.reduce(e)
    }
    ,
    t
}()
var by = function () {
    function t() {
        this.n = null,
            this.e = 0,
            this.d = null,
            this.p = null,
            this.q = null,
            this.dmp1 = null,
            this.dmq1 = null,
            this.coeff = null
    }

    return t.prototype.doPublic = function (t) {
        return t.modPowInt(this.e, this.n)
    }
        ,
        t.prototype.doPrivate = function (t) {
            if (null == this.p || null == this.q)
                return t.modPow(this.d, this.n);
            for (var e = t.mod(this.p).modPow(this.dmp1, this.p), n = t.mod(this.q).modPow(this.dmq1, this.q); e.compareTo(n) < 0;)
                e = e.add(this.p);
            return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)
        }
        ,
        t.prototype.setPublic = function (t, e) {
            null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = ry(t, 16),
                this.e = parseInt(e, 16)) : console.error("Invalid RSA public key")
        }
        ,
        t.prototype.encrypt = function (t) {
            var e = this.n.bitLength() + 7 >> 3
                , n = function (t, e) {
                if (e < t.length + 11)
                    return console.error("Message too long for RSA"),
                        null;
                for (var n = [], o = t.length - 1; o >= 0 && e > 0;) {
                    var i = t.charCodeAt(o--);
                    i < 128 ? n[--e] = i : i > 127 && i < 2048 ? (n[--e] = 63 & i | 128,
                        n[--e] = i >> 6 | 192) : (n[--e] = 63 & i | 128,
                        n[--e] = i >> 6 & 63 | 128,
                        n[--e] = i >> 12 | 224)
                }
                n[--e] = 0;
                for (var r = new yy, s = []; e > 2;) {
                    for (s[0] = 0; 0 == s[0];)
                        r.nextBytes(s);
                    n[--e] = s[0]
                }
                return n[--e] = 2,
                    n[--e] = 0,
                    new Jv(n)
            }(t, e);
            if (null == n)
                return null;
            var o = this.doPublic(n);
            if (null == o)
                return null;
            for (var i = o.toString(16), r = i.length, s = 0; s < 2 * e - r; s++)
                i = "0" + i;
            return i
        }
        ,
        t.prototype.setPrivate = function (t, e, n) {
            null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = ry(t, 16),
                this.e = parseInt(e, 16),
                this.d = ry(n, 16)) : console.error("Invalid RSA private key")
        }
        ,
        t.prototype.setPrivateEx = function (t, e, n, o, i, r, s, a) {
            null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = ry(t, 16),
                this.e = parseInt(e, 16),
                this.d = ry(n, 16),
                this.p = ry(o, 16),
                this.q = ry(i, 16),
                this.dmp1 = ry(r, 16),
                this.dmq1 = ry(s, 16),
                this.coeff = ry(a, 16)) : console.error("Invalid RSA private key")
        }
        ,
        t.prototype.generate = function (t, e) {
            var n = new yy
                , o = t >> 1;
            this.e = parseInt(e, 16);
            for (var i = new Jv(e, 16); ;) {
                for (; this.p = new Jv(t - o, 1, n),
                       0 != this.p.subtract(Jv.ONE).gcd(i).compareTo(Jv.ONE) || !this.p.isProbablePrime(10);)
                    ;
                for (; this.q = new Jv(o, 1, n),
                       0 != this.q.subtract(Jv.ONE).gcd(i).compareTo(Jv.ONE) || !this.q.isProbablePrime(10);)
                    ;
                if (this.p.compareTo(this.q) <= 0) {
                    var r = this.p;
                    this.p = this.q,
                        this.q = r
                }
                var s = this.p.subtract(Jv.ONE)
                    , a = this.q.subtract(Jv.ONE)
                    , l = s.multiply(a);
                if (0 == l.gcd(i).compareTo(Jv.ONE)) {
                    this.n = this.p.multiply(this.q),
                        this.d = i.modInverse(l),
                        this.dmp1 = this.d.mod(s),
                        this.dmq1 = this.d.mod(a),
                        this.coeff = this.q.modInverse(this.p);
                    break
                }
            }
        }
        ,
        t.prototype.decrypt = function (t) {
            var e = ry(t, 16)
                , n = this.doPrivate(e);
            return null == n ? null : function (t, e) {
                var n = t.toByteArray()
                    , o = 0;
                for (; o < n.length && 0 == n[o];)
                    ++o;
                if (n.length - o != e - 1 || 2 != n[o])
                    return null;
                ++o;
                for (; 0 != n[o];)
                    if (++o >= n.length)
                        return null;
                var i = "";
                for (; ++o < n.length;) {
                    var r = 255 & n[o];
                    r < 128 ? i += String.fromCharCode(r) : r > 191 && r < 224 ? (i += String.fromCharCode((31 & r) << 6 | 63 & n[o + 1]),
                        ++o) : (i += String.fromCharCode((15 & r) << 12 | (63 & n[o + 1]) << 6 | 63 & n[o + 2]),
                        o += 2)
                }
                return i
            }(n, this.n.bitLength() + 7 >> 3)
        }
        ,
        t.prototype.generateAsync = function (t, e, n) {
            var o = new yy
                , i = t >> 1;
            this.e = parseInt(e, 16);
            var r = new Jv(e, 16)
                , s = this
                , a = function () {
                var e = function () {
                    if (s.p.compareTo(s.q) <= 0) {
                        var t = s.p;
                        s.p = s.q,
                            s.q = t
                    }
                    var e = s.p.subtract(Jv.ONE)
                        , o = s.q.subtract(Jv.ONE)
                        , i = e.multiply(o);
                    0 == i.gcd(r).compareTo(Jv.ONE) ? (s.n = s.p.multiply(s.q),
                        s.d = r.modInverse(i),
                        s.dmp1 = s.d.mod(e),
                        s.dmq1 = s.d.mod(o),
                        s.coeff = s.q.modInverse(s.p),
                        setTimeout((function () {
                                n()
                            }
                        ), 0)) : setTimeout(a, 0)
                }
                    , l = function () {
                    s.q = iy(),
                        s.q.fromNumberAsync(i, 1, o, (function () {
                                s.q.subtract(Jv.ONE).gcda(r, (function (t) {
                                        0 == t.compareTo(Jv.ONE) && s.q.isProbablePrime(10) ? setTimeout(e, 0) : setTimeout(l, 0)
                                    }
                                ))
                            }
                        ))
                }
                    , u = function () {
                    s.p = iy(),
                        s.p.fromNumberAsync(t - i, 1, o, (function () {
                                s.p.subtract(Jv.ONE).gcda(r, (function (t) {
                                        0 == t.compareTo(Jv.ONE) && s.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(u, 0)
                                    }
                                ))
                            }
                        ))
                };
                setTimeout(u, 0)
            };
            setTimeout(a, 0)
        }
        ,
        t.prototype.sign = function (t, e, n) {
            var o = function (t) {
                return _y[t] || ""
            }(n)
                , i = function (t, e) {
                if (e < t.length + 22)
                    return console.error("Message too long for RSA"),
                        null;
                for (var n = e - t.length - 6, o = "", i = 0; i < n; i += 2)
                    o += "ff";
                return ry("0001" + o + "00" + t, 16)
            }(o + e(t).toString(), this.n.bitLength() / 4);
            if (null == i)
                return null;
            var r = this.doPrivate(i);
            if (null == r)
                return null;
            var s = r.toString(16);
            return 0 == (1 & s.length) ? s : "0" + s
        }
        ,
        t.prototype.verify = function (t, e, n) {
            var o = ry(e, 16)
                , i = this.doPublic(o);
            return null == i ? null : function (t) {
                for (var e in _y)
                    if (_y.hasOwnProperty(e)) {
                        var n = _y[e]
                            , o = n.length;
                        if (t.substr(0, o) == n)
                            return t.substr(o)
                    }
                return t
            }/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
                (i.toString(16).replace(/^1f+00/, "")) == n(t).toString()
        }
        ,
        t.prototype.encryptLong = function (t) {
            var e = this
                , n = ""
                , o = (this.n.bitLength() + 7 >> 3) - 11;
            return this.setSplitChn(t, o).forEach((function (t) {
                    n += e.encrypt(t)
                }
            )),
                n
        }
        ,
        t.prototype.decryptLong = function (t) {
            var e = ""
                , n = this.n.bitLength() + 7 >> 3
                , o = 2 * n;
            if (t.length > o) {
                for (var i = t.match(new RegExp(".{1," + o + "}", "g")) || [], r = [], s = 0; s < i.length; s++) {
                    var a = ry(i[s], 16)
                        , l = this.doPrivate(a);
                    if (null == l)
                        return null;
                    r.push(l)
                }
                e = function (t, e) {
                    for (var n = [], o = 0; o < t.length; o++) {
                        for (var i = t[o].toByteArray(), r = 0; r < i.length && 0 == i[r];)
                            ++r;
                        if (i.length - r != e - 1 || 2 != i[r])
                            return null;
                        for (++r; 0 != i[r];)
                            if (++r >= i.length)
                                return null;
                        n = n.concat(i.slice(r + 1))
                    }
                    var s = n
                        , a = -1
                        , l = "";
                    for (; ++a < s.length;) {
                        var u = 255 & s[a];
                        u < 128 ? l += String.fromCharCode(u) : u > 191 && u < 224 ? (l += String.fromCharCode((31 & u) << 6 | 63 & s[a + 1]),
                            ++a) : (l += String.fromCharCode((15 & u) << 12 | (63 & s[a + 1]) << 6 | 63 & s[a + 2]),
                            a += 2)
                    }
                    return l
                }(r, n)
            } else
                e = this.decrypt(t);
            return e
        }
        ,
        t.prototype.setSplitChn = function (t, e, n) {
            void 0 === n && (n = []);
            for (var o = t.split(""), i = 0, r = 0; r < o.length; r++) {
                var s = o[r].charCodeAt(0);
                if ((i += s <= 127 ? 1 : s <= 2047 ? 2 : s <= 65535 ? 3 : 4) > e) {
                    var a = t.substring(0, r);
                    return n.push(a),
                        this.setSplitChn(t.substring(r), e, n)
                }
            }
            return n.push(t),
                n
        }
        ,
        t
}();
var py, gy, my = null;
var dy = function() {
    function t() {
        this.i = 0,
        this.j = 0,
        this.S = []
    }
    return t.prototype.init = function(t) {
        var e, n, o;
        for (e = 0; e < 256; ++e)
            this.S[e] = e;
        for (n = 0,
        e = 0; e < 256; ++e)
            n = n + this.S[e] + t[e % t.length] & 255,
            o = this.S[e],
            this.S[e] = this.S[n],
            this.S[n] = o;
        this.i = 0,
        this.j = 0
    }
    ,
    t.prototype.next = function() {
        var t;
        return this.i = this.i + 1 & 255,
        this.j = this.j + this.S[this.i] & 255,
        t = this.S[this.i],
        this.S[this.i] = this.S[this.j],
        this.S[this.j] = t,
        this.S[t + this.S[this.i] & 255]
    }
    ,
    t
}();
function vy() {
    if (null == py) {
        for (py = new dy; gy < 256; ) {
            var t = Math.floor(65536 * Math.random());
            my[gy++] = 255 & t
        }
        for (py.init(my),
        gy = 0; gy < my.length; ++gy)
            my[gy] = 0;
        gy = 0
    }
    return py.next()
}
null == my && (my = [],
gy = 0);
var yy = function() {
    function t() {}
    return t.prototype.nextBytes = function(t) {
        for (var e = 0; e < t.length; ++e)
            t[e] = vy()
    }
    ,
    t
}();
function fy(t) {
    var e, n = 1;
    return 0 != (e = t >>> 16) && (t = e,
    n += 16),
    0 != (e = t >> 8) && (t = e,
    n += 8),
    0 != (e = t >> 4) && (t = e,
    n += 4),
    0 != (e = t >> 2) && (t = e,
    n += 2),
    0 != (e = t >> 1) && (t = e,
    n += 1),
    n
}
Jv = function() {
    function t(t, e, n) {
        null != t && ("number" == typeof t ? this.fromNumber(t, e, n) : null == e && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, e))
    }
    return t.prototype.toString = function(t) {
        if (this.s < 0)
            return "-" + this.negate().toString(t);
        var e;
        if (16 == t)
            e = 4;
        else if (8 == t)
            e = 3;
        else if (2 == t)
            e = 1;
        else if (32 == t)
            e = 5;
        else {
            if (4 != t)
                return this.toRadix(t);
            e = 2
        }
        var n, o = (1 << e) - 1, i = !1, r = "", s = this.t, a = this.DB - s * this.DB % e;
        if (s-- > 0)
            for (a < this.DB && (n = this[s] >> a) > 0 && (i = !0,
            r = Ov(n)); s >= 0; )
                a < e ? (n = (this[s] & (1 << a) - 1) << e - a,
                n |= this[--s] >> (a += this.DB - e)) : (n = this[s] >> (a -= e) & o,
                a <= 0 && (a += this.DB,
                --s)),
                n > 0 && (i = !0),
                i && (r += Ov(n));
        return i ? r : "0"
    }
    ,
    t.prototype.negate = function() {
        var e = iy();
        return t.ZERO.subTo(this, e),
        e
    }
    ,
    t.prototype.abs = function() {
        return this.s < 0 ? this.negate() : this
    }
    ,
    t.prototype.compareTo = function(t) {
        var e = this.s - t.s;
        if (0 != e)
            return e;
        var n = this.t;
        if (0 != (e = n - t.t))
            return this.s < 0 ? -e : e;
        for (; --n >= 0; )
            if (0 != (e = this[n] - t[n]))
                return e;
        return 0
    }
    ,
    t.prototype.bitLength = function() {
        return this.t <= 0 ? 0 : this.DB * (this.t - 1) + fy(this[this.t - 1] ^ this.s & this.DM)
    }
    ,
    t.prototype.mod = function(e) {
        var n = iy();
        return this.abs().divRemTo(e, null, n),
        this.s < 0 && n.compareTo(t.ZERO) > 0 && e.subTo(n, n),
        n
    }
    ,
    t.prototype.modPowInt = function(t, e) {
        var n;
        return n = t < 256 || e.isEven() ? new ey(e) : new ny(e),
        this.exp(t, n)
    }
    ,
    t.prototype.clone = function() {
        var t = iy();
        return this.copyTo(t),
        t
    }
    ,
    t.prototype.intValue = function() {
        if (this.s < 0) {
            if (1 == this.t)
                return this[0] - this.DV;
            if (0 == this.t)
                return -1
        } else {
            if (1 == this.t)
                return this[0];
            if (0 == this.t)
                return 0
        }
        return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
    }
    ,
    t.prototype.byteValue = function() {
        return 0 == this.t ? this.s : this[0] << 24 >> 24
    }
    ,
    t.prototype.shortValue = function() {
        return 0 == this.t ? this.s : this[0] << 16 >> 16
    }
    ,
    t.prototype.signum = function() {
        return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
    }
    ,
    t.prototype.toByteArray = function() {
        var t = this.t
          , e = [];
        e[0] = this.s;
        var n, o = this.DB - t * this.DB % 8, i = 0;
        if (t-- > 0)
            for (o < this.DB && (n = this[t] >> o) != (this.s & this.DM) >> o && (e[i++] = n | this.s << this.DB - o); t >= 0; )
                o < 8 ? (n = (this[t] & (1 << o) - 1) << 8 - o,
                n |= this[--t] >> (o += this.DB - 8)) : (n = this[t] >> (o -= 8) & 255,
                o <= 0 && (o += this.DB,
                --t)),
                0 != (128 & n) && (n |= -256),
                0 == i && (128 & this.s) != (128 & n) && ++i,
                (i > 0 || n != this.s) && (e[i++] = n);
        return e
    }
    ,
    t.prototype.equals = function(t) {
        return 0 == this.compareTo(t)
    }
    ,
    t.prototype.min = function(t) {
        return this.compareTo(t) < 0 ? this : t
    }
    ,
    t.prototype.max = function(t) {
        return this.compareTo(t) > 0 ? this : t
    }
    ,
    t.prototype.and = function(t) {
        var e = iy();
        return this.bitwiseTo(t, Av, e),
        e
    }
    ,
    t.prototype.or = function(t) {
        var e = iy();
        return this.bitwiseTo(t, Mv, e),
        e
    }
    ,
    t.prototype.xor = function(t) {
        var e = iy();
        return this.bitwiseTo(t, Dv, e),
        e
    }
    ,
    t.prototype.andNot = function(t) {
        var e = iy();
        return this.bitwiseTo(t, Iv, e),
        e
    }
    ,
    t.prototype.not = function() {
        for (var t = iy(), e = 0; e < this.t; ++e)
            t[e] = this.DM & ~this[e];
        return t.t = this.t,
        t.s = ~this.s,
        t
    }
    ,
    t.prototype.shiftLeft = function(t) {
        var e = iy();
        return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e),
        e
    }
    ,
    t.prototype.shiftRight = function(t) {
        var e = iy();
        return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e),
        e
    }
    ,
    t.prototype.getLowestSetBit = function() {
        for (var t = 0; t < this.t; ++t)
            if (0 != this[t])
                return t * this.DB + Bv(this[t]);
        return this.s < 0 ? this.t * this.DB : -1
    }
    ,
    t.prototype.bitCount = function() {
        for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
            t += Lv(this[n] ^ e);
        return t
    }
    ,
    t.prototype.testBit = function(t) {
        var e = Math.floor(t / this.DB);
        return e >= this.t ? 0 != this.s : 0 != (this[e] & 1 << t % this.DB)
    }
    ,
    t.prototype.setBit = function(t) {
        return this.changeBit(t, Mv)
    }
    ,
    t.prototype.clearBit = function(t) {
        return this.changeBit(t, Iv)
    }
    ,
    t.prototype.flipBit = function(t) {
        return this.changeBit(t, Dv)
    }
    ,
    t.prototype.add = function(t) {
        var e = iy();
        return this.addTo(t, e),
        e
    }
    ,
    t.prototype.subtract = function(t) {
        var e = iy();
        return this.subTo(t, e),
        e
    }
    ,
    t.prototype.multiply = function(t) {
        var e = iy();
        return this.multiplyTo(t, e),
        e
    }
    ,
    t.prototype.divide = function(t) {
        var e = iy();
        return this.divRemTo(t, e, null),
        e
    }
    ,
    t.prototype.remainder = function(t) {
        var e = iy();
        return this.divRemTo(t, null, e),
        e
    }
    ,
    t.prototype.divideAndRemainder = function(t) {
        var e = iy()
          , n = iy();
        return this.divRemTo(t, e, n),
        [e, n]
    }
    ,
    t.prototype.modPow = function(t, e) {
        var n, o, i = t.bitLength(), r = hy(1);
        if (i <= 0)
            return r;
        n = i < 18 ? 1 : i < 48 ? 3 : i < 144 ? 4 : i < 768 ? 5 : 6,
        o = i < 8 ? new ey(e) : e.isEven() ? new oy(e) : new ny(e);
        var s = []
          , a = 3
          , l = n - 1
          , u = (1 << n) - 1;
        if (s[1] = o.convert(this),
        n > 1) {
            var c = iy();
            for (o.sqrTo(s[1], c); a <= u; )
                s[a] = iy(),
                o.mulTo(c, s[a - 2], s[a]),
                a += 2
        }
        var h, f, d = t.t - 1, p = !0, g = iy();
        for (i = fy(t[d]) - 1; d >= 0; ) {
            for (i >= l ? h = t[d] >> i - l & u : (h = (t[d] & (1 << i + 1) - 1) << l - i,
            d > 0 && (h |= t[d - 1] >> this.DB + i - l)),
            a = n; 0 == (1 & h); )
                h >>= 1,
                --a;
            if ((i -= a) < 0 && (i += this.DB,
            --d),
            p)
                s[h].copyTo(r),
                p = !1;
            else {
                for (; a > 1; )
                    o.sqrTo(r, g),
                    o.sqrTo(g, r),
                    a -= 2;
                a > 0 ? o.sqrTo(r, g) : (f = r,
                r = g,
                g = f),
                o.mulTo(g, s[h], r)
            }
            for (; d >= 0 && 0 == (t[d] & 1 << i); )
                o.sqrTo(r, g),
                f = r,
                r = g,
                g = f,
                --i < 0 && (i = this.DB - 1,
                --d)
        }
        return o.revert(r)
    }
    ,
    t.prototype.modInverse = function(e) {
        var n = e.isEven();
        if (this.isEven() && n || 0 == e.signum())
            return t.ZERO;
        for (var o = e.clone(), i = this.clone(), r = hy(1), s = hy(0), a = hy(0), l = hy(1); 0 != o.signum(); ) {
            for (; o.isEven(); )
                o.rShiftTo(1, o),
                n ? (r.isEven() && s.isEven() || (r.addTo(this, r),
                s.subTo(e, s)),
                r.rShiftTo(1, r)) : s.isEven() || s.subTo(e, s),
                s.rShiftTo(1, s);
            for (; i.isEven(); )
                i.rShiftTo(1, i),
                n ? (a.isEven() && l.isEven() || (a.addTo(this, a),
                l.subTo(e, l)),
                a.rShiftTo(1, a)) : l.isEven() || l.subTo(e, l),
                l.rShiftTo(1, l);
            o.compareTo(i) >= 0 ? (o.subTo(i, o),
            n && r.subTo(a, r),
            s.subTo(l, s)) : (i.subTo(o, i),
            n && a.subTo(r, a),
            l.subTo(s, l))
        }
        return 0 != i.compareTo(t.ONE) ? t.ZERO : l.compareTo(e) >= 0 ? l.subtract(e) : l.signum() < 0 ? (l.addTo(e, l),
        l.signum() < 0 ? l.add(e) : l) : l
    }
    ,
    t.prototype.pow = function(t) {
        return this.exp(t, new ty)
    }
    ,
    t.prototype.gcd = function(t) {
        var e = this.s < 0 ? this.negate() : this.clone()
          , n = t.s < 0 ? t.negate() : t.clone();
        if (e.compareTo(n) < 0) {
            var o = e;
            e = n,
            n = o
        }
        var i = e.getLowestSetBit()
          , r = n.getLowestSetBit();
        if (r < 0)
            return e;
        for (i < r && (r = i),
        r > 0 && (e.rShiftTo(r, e),
        n.rShiftTo(r, n)); e.signum() > 0; )
            (i = e.getLowestSetBit()) > 0 && e.rShiftTo(i, e),
            (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n),
            e.compareTo(n) >= 0 ? (e.subTo(n, e),
            e.rShiftTo(1, e)) : (n.subTo(e, n),
            n.rShiftTo(1, n));
        return r > 0 && n.lShiftTo(r, n),
        n
    }
    ,
    t.prototype.isProbablePrime = function(t) {
        var e, n = this.abs();
        if (1 == n.t && n[0] <= Zv[Zv.length - 1]) {
            for (e = 0; e < Zv.length; ++e)
                if (n[0] == Zv[e])
                    return !0;
            return !1
        }
        if (n.isEven())
            return !1;
        for (e = 1; e < Zv.length; ) {
            for (var o = Zv[e], i = e + 1; i < Zv.length && o < Qv; )
                o *= Zv[i++];
            for (o = n.modInt(o); e < i; )
                if (o % Zv[e++] == 0)
                    return !1
        }
        return n.millerRabin(t)
    }
    ,
    t.prototype.copyTo = function(t) {
        for (var e = this.t - 1; e >= 0; --e)
            t[e] = this[e];
        t.t = this.t,
        t.s = this.s
    }
    ,
    t.prototype.fromInt = function(t) {
        this.t = 1,
        this.s = t < 0 ? -1 : 0,
        t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0
    }
    ,
    t.prototype.fromString = function(e, n) {
        var o;
        if (16 == n)
            o = 4;
        else if (8 == n)
            o = 3;
        else if (256 == n)
            o = 8;
        else if (2 == n)
            o = 1;
        else if (32 == n)
            o = 5;
        else {
            if (4 != n)
                return void this.fromRadix(e, n);
            o = 2
        }
        this.t = 0,
        this.s = 0;
        for (var i = e.length, r = !1, s = 0; --i >= 0; ) {
            var a = 8 == o ? 255 & +e[i] : cy(e, i);
            a < 0 ? "-" == e.charAt(i) && (r = !0) : (r = !1,
            0 == s ? this[this.t++] = a : s + o > this.DB ? (this[this.t - 1] |= (a & (1 << this.DB - s) - 1) << s,
            this[this.t++] = a >> this.DB - s) : this[this.t - 1] |= a << s,
            (s += o) >= this.DB && (s -= this.DB))
        }
        8 == o && 0 != (128 & +e[0]) && (this.s = -1,
        s > 0 && (this[this.t - 1] |= (1 << this.DB - s) - 1 << s)),
        this.clamp(),
        r && t.ZERO.subTo(this, this)
    }
    ,
    t.prototype.clamp = function() {
        for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t; )
            --this.t
    }
    ,
    t.prototype.dlShiftTo = function(t, e) {
        var n;
        for (n = this.t - 1; n >= 0; --n)
            e[n + t] = this[n];
        for (n = t - 1; n >= 0; --n)
            e[n] = 0;
        e.t = this.t + t,
        e.s = this.s
    }
    ,
    t.prototype.drShiftTo = function(t, e) {
        for (var n = t; n < this.t; ++n)
            e[n - t] = this[n];
        e.t = Math.max(this.t - t, 0),
        e.s = this.s
    }
    ,
    t.prototype.lShiftTo = function(t, e) {
        for (var n = t % this.DB, o = this.DB - n, i = (1 << o) - 1, r = Math.floor(t / this.DB), s = this.s << n & this.DM, a = this.t - 1; a >= 0; --a)
            e[a + r + 1] = this[a] >> o | s,
            s = (this[a] & i) << n;
        for (a = r - 1; a >= 0; --a)
            e[a] = 0;
        e[r] = s,
        e.t = this.t + r + 1,
        e.s = this.s,
        e.clamp()
    }
    ,
    t.prototype.rShiftTo = function(t, e) {
        e.s = this.s;
        var n = Math.floor(t / this.DB);
        if (n >= this.t)
            e.t = 0;
        else {
            var o = t % this.DB
              , i = this.DB - o
              , r = (1 << o) - 1;
            e[0] = this[n] >> o;
            for (var s = n + 1; s < this.t; ++s)
                e[s - n - 1] |= (this[s] & r) << i,
                e[s - n] = this[s] >> o;
            o > 0 && (e[this.t - n - 1] |= (this.s & r) << i),
            e.t = this.t - n,
            e.clamp()
        }
    }
    ,
    t.prototype.subTo = function(t, e) {
        for (var n = 0, o = 0, i = Math.min(t.t, this.t); n < i; )
            o += this[n] - t[n],
            e[n++] = o & this.DM,
            o >>= this.DB;
        if (t.t < this.t) {
            for (o -= t.s; n < this.t; )
                o += this[n],
                e[n++] = o & this.DM,
                o >>= this.DB;
            o += this.s
        } else {
            for (o += this.s; n < t.t; )
                o -= t[n],
                e[n++] = o & this.DM,
                o >>= this.DB;
            o -= t.s
        }
        e.s = o < 0 ? -1 : 0,
        o < -1 ? e[n++] = this.DV + o : o > 0 && (e[n++] = o),
        e.t = n,
        e.clamp()
    }
    ,
    t.prototype.multiplyTo = function(e, n) {
        var o = this.abs()
          , i = e.abs()
          , r = o.t;
        for (n.t = r + i.t; --r >= 0; )
            n[r] = 0;
        for (r = 0; r < i.t; ++r)
            n[r + o.t] = o.am(0, i[r], n, r, 0, o.t);
        n.s = 0,
        n.clamp(),
        this.s != e.s && t.ZERO.subTo(n, n)
    }
    ,
    t.prototype.squareTo = function(t) {
        for (var e = this.abs(), n = t.t = 2 * e.t; --n >= 0; )
            t[n] = 0;
        for (n = 0; n < e.t - 1; ++n) {
            var o = e.am(n, e[n], t, 2 * n, 0, 1);
            (t[n + e.t] += e.am(n + 1, 2 * e[n], t, 2 * n + 1, o, e.t - n - 1)) >= e.DV && (t[n + e.t] -= e.DV,
            t[n + e.t + 1] = 1)
        }
        t.t > 0 && (t[t.t - 1] += e.am(n, e[n], t, 2 * n, 0, 1)),
        t.s = 0,
        t.clamp()
    }
    ,
    t.prototype.divRemTo = function(e, n, o) {
        var i = e.abs();
        if (!(i.t <= 0)) {
            var r = this.abs();
            if (r.t < i.t)
                return null != n && n.fromInt(0),
                void (null != o && this.copyTo(o));
            null == o && (o = iy());
            var s = iy()
              , a = this.s
              , l = e.s
              , u = this.DB - fy(i[i.t - 1]);
            u > 0 ? (i.lShiftTo(u, s),
            r.lShiftTo(u, o)) : (i.copyTo(s),
            r.copyTo(o));
            var c = s.t
              , h = s[c - 1];
            if (0 != h) {
                var f = h * (1 << this.F1) + (c > 1 ? s[c - 2] >> this.F2 : 0)
                  , d = this.FV / f
                  , p = (1 << this.F1) / f
                  , g = 1 << this.F2
                  , m = o.t
                  , v = m - c
                  , y = null == n ? iy() : n;
                for (s.dlShiftTo(v, y),
                o.compareTo(y) >= 0 && (o[o.t++] = 1,
                o.subTo(y, o)),
                t.ONE.dlShiftTo(c, y),
                y.subTo(s, s); s.t < c; )
                    s[s.t++] = 0;
                for (; --v >= 0; ) {
                    var b = o[--m] == h ? this.DM : Math.floor(o[m] * d + (o[m - 1] + g) * p);
                    if ((o[m] += s.am(0, b, o, v, 0, c)) < b)
                        for (s.dlShiftTo(v, y),
                        o.subTo(y, o); o[m] < --b; )
                            o.subTo(y, o)
                }
                null != n && (o.drShiftTo(c, n),
                a != l && t.ZERO.subTo(n, n)),
                o.t = c,
                o.clamp(),
                u > 0 && o.rShiftTo(u, o),
                a < 0 && t.ZERO.subTo(o, o)
            }
        }
    }
    ,
    t.prototype.invDigit = function() {
        if (this.t < 1)
            return 0;
        var t = this[0];
        if (0 == (1 & t))
            return 0;
        var e = 3 & t;
        return (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) > 0 ? this.DV - e : -e
    }
    ,
    t.prototype.isEven = function() {
        return 0 == (this.t > 0 ? 1 & this[0] : this.s)
    }
    ,
    t.prototype.exp = function(e, n) {
        if (e > 4294967295 || e < 1)
            return t.ONE;
        var o = iy()
          , i = iy()
          , r = n.convert(this)
          , s = fy(e) - 1;
        for (r.copyTo(o); --s >= 0; )
            if (n.sqrTo(o, i),
            (e & 1 << s) > 0)
                n.mulTo(i, r, o);
            else {
                var a = o;
                o = i,
                i = a
            }
        return n.revert(o)
    }
    ,
    t.prototype.chunkSize = function(t) {
        return Math.floor(Math.LN2 * this.DB / Math.log(t))
    }
    ,
    t.prototype.toRadix = function(t) {
        if (null == t && (t = 10),
        0 == this.signum() || t < 2 || t > 36)
            return "0";
        var e = this.chunkSize(t)
          , n = Math.pow(t, e)
          , o = hy(n)
          , i = iy()
          , r = iy()
          , s = "";
        for (this.divRemTo(o, i, r); i.signum() > 0; )
            s = (n + r.intValue()).toString(t).substr(1) + s,
            i.divRemTo(o, i, r);
        return r.intValue().toString(t) + s
    }
    ,
    t.prototype.fromRadix = function(e, n) {
        this.fromInt(0),
        null == n && (n = 10);
        for (var o = this.chunkSize(n), i = Math.pow(n, o), r = !1, s = 0, a = 0, l = 0; l < e.length; ++l) {
            var u = cy(e, l);
            u < 0 ? "-" == e.charAt(l) && 0 == this.signum() && (r = !0) : (a = n * a + u,
            ++s >= o && (this.dMultiply(i),
            this.dAddOffset(a, 0),
            s = 0,
            a = 0))
        }
        s > 0 && (this.dMultiply(Math.pow(n, s)),
        this.dAddOffset(a, 0)),
        r && t.ZERO.subTo(this, this)
    }
    ,
    t.prototype.fromNumber = function(e, n, o) {
        if ("number" == typeof n)
            if (e < 2)
                this.fromInt(1);
            else
                for (this.fromNumber(e, o),
                this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), Mv, this),
                this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n); )
                    this.dAddOffset(2, 0),
                    this.bitLength() > e && this.subTo(t.ONE.shiftLeft(e - 1), this);
        else {
            var i = []
              , r = 7 & e;
            i.length = 1 + (e >> 3),
            n.nextBytes(i),
            r > 0 ? i[0] &= (1 << r) - 1 : i[0] = 0,
            this.fromString(i, 256)
        }
    }
    ,
    t.prototype.bitwiseTo = function(t, e, n) {
        var o, i, r = Math.min(t.t, this.t);
        for (o = 0; o < r; ++o)
            n[o] = e(this[o], t[o]);
        if (t.t < this.t) {
            for (i = t.s & this.DM,
            o = r; o < this.t; ++o)
                n[o] = e(this[o], i);
            n.t = this.t
        } else {
            for (i = this.s & this.DM,
            o = r; o < t.t; ++o)
                n[o] = e(i, t[o]);
            n.t = t.t
        }
        n.s = e(this.s, t.s),
        n.clamp()
    }
    ,
    t.prototype.changeBit = function(e, n) {
        var o = t.ONE.shiftLeft(e);
        return this.bitwiseTo(o, n, o),
        o
    }
    ,
    t.prototype.addTo = function(t, e) {
        for (var n = 0, o = 0, i = Math.min(t.t, this.t); n < i; )
            o += this[n] + t[n],
            e[n++] = o & this.DM,
            o >>= this.DB;
        if (t.t < this.t) {
            for (o += t.s; n < this.t; )
                o += this[n],
                e[n++] = o & this.DM,
                o >>= this.DB;
            o += this.s
        } else {
            for (o += this.s; n < t.t; )
                o += t[n],
                e[n++] = o & this.DM,
                o >>= this.DB;
            o += t.s
        }
        e.s = o < 0 ? -1 : 0,
        o > 0 ? e[n++] = o : o < -1 && (e[n++] = this.DV + o),
        e.t = n,
        e.clamp()
    }
    ,
    t.prototype.dMultiply = function(t) {
        this[this.t] = this.am(0, t - 1, this, 0, 0, this.t),
        ++this.t,
        this.clamp()
    }
    ,
    t.prototype.dAddOffset = function(t, e) {
        if (0 != t) {
            for (; this.t <= e; )
                this[this.t++] = 0;
            for (this[e] += t; this[e] >= this.DV; )
                this[e] -= this.DV,
                ++e >= this.t && (this[this.t++] = 0),
                ++this[e]
        }
    }
    ,
    t.prototype.multiplyLowerTo = function(t, e, n) {
        var o = Math.min(this.t + t.t, e);
        for (n.s = 0,
        n.t = o; o > 0; )
            n[--o] = 0;
        for (var i = n.t - this.t; o < i; ++o)
            n[o + this.t] = this.am(0, t[o], n, o, 0, this.t);
        for (i = Math.min(t.t, e); o < i; ++o)
            this.am(0, t[o], n, o, 0, e - o);
        n.clamp()
    }
    ,
    t.prototype.multiplyUpperTo = function(t, e, n) {
        --e;
        var o = n.t = this.t + t.t - e;
        for (n.s = 0; --o >= 0; )
            n[o] = 0;
        for (o = Math.max(e - this.t, 0); o < t.t; ++o)
            n[this.t + o - e] = this.am(e - o, t[o], n, 0, 0, this.t + o - e);
        n.clamp(),
        n.drShiftTo(1, n)
    }
    ,
    t.prototype.modInt = function(t) {
        if (t <= 0)
            return 0;
        var e = this.DV % t
          , n = this.s < 0 ? t - 1 : 0;
        if (this.t > 0)
            if (0 == e)
                n = this[0] % t;
            else
                for (var o = this.t - 1; o >= 0; --o)
                    n = (e * n + this[o]) % t;
        return n
    }
    ,
    t.prototype.millerRabin = function(e) {
        var n = this.subtract(t.ONE)
          , o = n.getLowestSetBit();
        if (o <= 0)
            return !1;
        var i = n.shiftRight(o);
        (e = e + 1 >> 1) > Zv.length && (e = Zv.length);
        for (var r = iy(), s = 0; s < e; ++s) {
            r.fromInt(Zv[Math.floor(Math.random() * Zv.length)]);
            var a = r.modPow(i, this);
            if (0 != a.compareTo(t.ONE) && 0 != a.compareTo(n)) {
                for (var l = 1; l++ < o && 0 != a.compareTo(n); )
                    if (0 == (a = a.modPowInt(2, this)).compareTo(t.ONE))
                        return !1;
                if (0 != a.compareTo(n))
                    return !1
            }
        }
        return !0
    }
    ,
    t.prototype.square = function() {
        var t = iy();
        return this.squareTo(t),
        t
    }
    ,
    t.prototype.gcda = function(t, e) {
        var n = this.s < 0 ? this.negate() : this.clone()
          , o = t.s < 0 ? t.negate() : t.clone();
        if (n.compareTo(o) < 0) {
            var i = n;
            n = o,
            o = i
        }
        var r = n.getLowestSetBit()
          , s = o.getLowestSetBit();
        if (s < 0)
            e(n);
        else {
            r < s && (s = r),
            s > 0 && (n.rShiftTo(s, n),
            o.rShiftTo(s, o));
            var a = function() {
                (r = n.getLowestSetBit()) > 0 && n.rShiftTo(r, n),
                (r = o.getLowestSetBit()) > 0 && o.rShiftTo(r, o),
                n.compareTo(o) >= 0 ? (n.subTo(o, n),
                n.rShiftTo(1, n)) : (o.subTo(n, o),
                o.rShiftTo(1, o)),
                n.signum() > 0 ? setTimeout(a, 0) : (s > 0 && o.lShiftTo(s, o),
                setTimeout((function() {
                    e(o)
                }
                ), 0))
            };
            setTimeout(a, 10)
        }
    }
    ,
    t.prototype.fromNumberAsync = function(e, n, o, i) {
        if ("number" == typeof n)
            if (e < 2)
                this.fromInt(1);
            else {
                this.fromNumber(e, o),
                this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), Mv, this),
                this.isEven() && this.dAddOffset(1, 0);
                var r = this
                  , s = function() {
                    r.dAddOffset(2, 0),
                    r.bitLength() > e && r.subTo(t.ONE.shiftLeft(e - 1), r),
                    r.isProbablePrime(n) ? setTimeout((function() {
                        i()
                    }
                    ), 0) : setTimeout(s, 0)
                };
                setTimeout(s, 0)
            }
        else {
            var a = []
              , l = 7 & e;
            a.length = 1 + (e >> 3),
            n.nextBytes(a),
            l > 0 ? a[0] &= (1 << l) - 1 : a[0] = 0,
            this.fromString(a, 256)
        }
    }
    ,
    t
}()
const Yav=28
Jv.prototype.DB = Yav,
Jv.prototype.DM = (1 << Yav) - 1,
Jv.prototype.DV = 1 << Yav;
Jv.prototype.FV = Math.pow(2, 52),
Jv.prototype.F1 = 52 - Yav,
Jv.prototype.F2 = 2 * Yav - 52;
Jv.ZERO = hy(0),
Jv.ONE = hy(1);
Jv.prototype.am = function(t, e, n, o, i, r) {
    for (var s = 16383 & e, a = e >> 14; --r >= 0; ) {
        var l = 16383 & this[t]
          , u = this[t++] >> 14
          , c = a * l + u * s;
        i = ((l = s * l + ((16383 & c) << 14) + n[o] + i) >> 28) + (c >> 14) + a * u,
        n[o++] = 268435455 & l
    }
    return i
}
function hy(t) {
    var e = iy();
    return e.fromInt(t),
    e
}
function ry(t, e) {
    return new Jv(t,e)
}
var Sy, Ty = globalThis && globalThis.__extends || (Sy = function(t, e) {
    return (Sy = Object.setPrototypeOf || {
        __proto__: []
    }instanceof Array && function(t, e) {
        t.__proto__ = e
    }
    || function(t, e) {
        for (var n in e)
            Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
    }
    )(t, e)
}
,
function(t, e) {
    if ("function" != typeof e && null !== e)
        throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
    function n() {
        this.constructor = t
    }
    Sy(t, e),
    t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype,
    new n)
}
)
var Yv, Xv = function() {
    function t(e, n) {
        this.hexDigits = "0123456789ABCDEF",
        e instanceof t ? (this.enc = e.enc,
        this.pos = e.pos) : (this.enc = e,
        this.pos = n)
    }
    return t.prototype.get = function(t) {
        if (void 0 === t && (t = this.pos++),
        t >= this.enc.length)
            throw new Error("Requesting byte offset " + t + " on a stream of length " + this.enc.length);
        return "string" == typeof this.enc ? this.enc.charCodeAt(t) : this.enc[t]
    }
    ,
    t.prototype.hexByte = function(t) {
        return this.hexDigits.charAt(t >> 4 & 15) + this.hexDigits.charAt(15 & t)
    }
    ,
    t.prototype.hexDump = function(t, e, n) {
        for (var o = "", i = t; i < e; ++i)
            if (o += this.hexByte(this.get(i)),
            !0 !== n)
                switch (15 & i) {
                case 7:
                    o += "  ";
                    break;
                case 15:
                    o += "\n";
                    break;
                default:
                    o += " "
                }
        return o
    }
    ,
    t.prototype.isASCII = function(t, e) {
        for (var n = t; n < e; ++n) {
            var o = this.get(n);
            if (o < 32 || o > 176)
                return !1
        }
        return !0
    }
    ,
    t.prototype.parseStringISO = function(t, e) {
        for (var n = "", o = t; o < e; ++o)
            n += String.fromCharCode(this.get(o));
        return n
    }
    ,
    t.prototype.parseStringUTF = function(t, e) {
        for (var n = "", o = t; o < e; ) {
            var i = this.get(o++);
            n += i < 128 ? String.fromCharCode(i) : i > 191 && i < 224 ? String.fromCharCode((31 & i) << 6 | 63 & this.get(o++)) : String.fromCharCode((15 & i) << 12 | (63 & this.get(o++)) << 6 | 63 & this.get(o++))
        }
        return n
    }
    ,
    t.prototype.parseStringBMP = function(t, e) {
        for (var n, o, i = "", r = t; r < e; )
            n = this.get(r++),
            o = this.get(r++),
            i += String.fromCharCode(n << 8 | o);
        return i
    }
    ,
    t.prototype.parseTime = function(t, e, n) {
        var o = this.parseStringISO(t, e)
          , i = (n ? zv : Wv).exec(o);
        return i ? (n && (i[1] = +i[1],
        i[1] += +i[1] < 70 ? 2e3 : 1900),
        o = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4],
        i[5] && (o += ":" + i[5],
        i[6] && (o += ":" + i[6],
        i[7] && (o += "." + i[7]))),
        i[8] && (o += " UTC",
        "Z" != i[8] && (o += i[8],
        i[9] && (o += ":" + i[9]))),
        o) : "Unrecognized time: " + o
    }
    ,
    t.prototype.parseInteger = function(t, e) {
        for (var n, o = this.get(t), i = o > 127, r = i ? 255 : 0, s = ""; o == r && ++t < e; )
            o = this.get(t);
        if (0 === (n = e - t))
            return i ? -1 : 0;
        if (n > 4) {
            for (s = o,
            n <<= 3; 0 == (128 & (+s ^ r)); )
                s = +s << 1,
                --n;
            s = "(" + n + " bit)\n"
        }
        i && (o -= 256);
        for (var a = new qv(o), l = t + 1; l < e; ++l)
            a.mulAdd(256, this.get(l));
        return s + a.toString()
    }
    ,
    t.prototype.parseBitString = function(t, e, n) {
        for (var o = this.get(t), i = "(" + ((e - t - 1 << 3) - o) + " bit)\n", r = "", s = t + 1; s < e; ++s) {
            for (var a = this.get(s), l = s == e - 1 ? o : 0, u = 7; u >= l; --u)
                r += a >> u & 1 ? "1" : "0";
            if (r.length > n)
                return i + Uv(r, n)
        }
        return i + r
    }
    ,
    t.prototype.parseOctetString = function(t, e, n) {
        if (this.isASCII(t, e))
            return Uv(this.parseStringISO(t, e), n);
        var o = e - t
          , i = "(" + o + " byte)\n";
        o > (n /= 2) && (e = t + n);
        for (var r = t; r < e; ++r)
            i += this.hexByte(this.get(r));
        return o > n && (i += "…"),
        i
    }
    ,
    t.prototype.parseOID = function(t, e, n) {
        for (var o = "", i = new qv, r = 0, s = t; s < e; ++s) {
            var a = this.get(s);
            if (i.mulAdd(128, 127 & a),
            r += 7,
            !(128 & a)) {
                if ("" === o)
                    if ((i = i.simplify())instanceof qv)
                        i.sub(80),
                        o = "2." + i.toString();
                    else {
                        var l = i < 80 ? i < 40 ? 0 : 1 : 2;
                        o = l + "." + (i - 40 * l)
                    }
                else
                    o += "." + i.toString();
                if (o.length > n)
                    return Uv(o, n);
                i = new qv,
                r = 0
            }
        }
        return r > 0 && (o += ".incomplete"),
        o
    }
    ,
    t
}()
var Kv = function() {
    function t(t, e, n, o, i) {
        if (!(o instanceof Gv))
            throw new Error("Invalid tag value.");
        this.stream = t,
        this.header = e,
        this.length = n,
        this.tag = o,
        this.sub = i
    }
    return t.prototype.typeName = function() {
        switch (this.tag.tagClass) {
        case 0:
            switch (this.tag.tagNumber) {
            case 0:
                return "EOC";
            case 1:
                return "BOOLEAN";
            case 2:
                return "INTEGER";
            case 3:
                return "BIT_STRING";
            case 4:
                return "OCTET_STRING";
            case 5:
                return "NULL";
            case 6:
                return "OBJECT_IDENTIFIER";
            case 7:
                return "ObjectDescriptor";
            case 8:
                return "EXTERNAL";
            case 9:
                return "REAL";
            case 10:
                return "ENUMERATED";
            case 11:
                return "EMBEDDED_PDV";
            case 12:
                return "UTF8String";
            case 16:
                return "SEQUENCE";
            case 17:
                return "SET";
            case 18:
                return "NumericString";
            case 19:
                return "PrintableString";
            case 20:
                return "TeletexString";
            case 21:
                return "VideotexString";
            case 22:
                return "IA5String";
            case 23:
                return "UTCTime";
            case 24:
                return "GeneralizedTime";
            case 25:
                return "GraphicString";
            case 26:
                return "VisibleString";
            case 27:
                return "GeneralString";
            case 28:
                return "UniversalString";
            case 30:
                return "BMPString"
            }
            return "Universal_" + this.tag.tagNumber.toString();
        case 1:
            return "Application_" + this.tag.tagNumber.toString();
        case 2:
            return "[" + this.tag.tagNumber.toString() + "]";
        case 3:
            return "Private_" + this.tag.tagNumber.toString()
        }
    }
    ,
    t.prototype.content = function(t) {
        if (void 0 === this.tag)
            return null;
        void 0 === t && (t = 1 / 0);
        var e = this.posContent()
          , n = Math.abs(this.length);
        if (!this.tag.isUniversal())
            return null !== this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
        switch (this.tag.tagNumber) {
        case 1:
            return 0 === this.stream.get(e) ? "false" : "true";
        case 2:
            return this.stream.parseInteger(e, e + n);
        case 3:
            return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(e, e + n, t);
        case 4:
            return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
        case 6:
            return this.stream.parseOID(e, e + n, t);
        case 16:
        case 17:
            return null !== this.sub ? "(" + this.sub.length + " elem)" : "(no elem)";
        case 12:
            return Uv(this.stream.parseStringUTF(e, e + n), t);
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 26:
            return Uv(this.stream.parseStringISO(e, e + n), t);
        case 30:
            return Uv(this.stream.parseStringBMP(e, e + n), t);
        case 23:
        case 24:
            return this.stream.parseTime(e, e + n, 23 == this.tag.tagNumber)
        }
        return null
    }
    ,
    t.prototype.toString = function() {
        return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]"
    }
    ,
    t.prototype.toPrettyString = function(t) {
        void 0 === t && (t = "");
        var e = t + this.typeName() + " @" + this.stream.pos;
        if (this.length >= 0 && (e += "+"),
        e += this.length,
        this.tag.tagConstructed ? e += " (constructed)" : !this.tag.isUniversal() || 3 != this.tag.tagNumber && 4 != this.tag.tagNumber || null === this.sub || (e += " (encapsulates)"),
        e += "\n",
        null !== this.sub) {
            t += "  ";
            for (var n = 0, o = this.sub.length; n < o; ++n)
                e += this.sub[n].toPrettyString(t)
        }
        return e
    }
    ,
    t.prototype.posStart = function() {
        return this.stream.pos
    }
    ,
    t.prototype.posContent = function() {
        return this.stream.pos + this.header
    }
    ,
    t.prototype.posEnd = function() {
        return this.stream.pos + this.header + Math.abs(this.length)
    }
    ,
    t.prototype.toHexString = function() {
        return this.stream.hexDump(this.posStart(), this.posEnd(), !0)
    }
    ,
    t.decodeLength = function(t) {
        var e = t.get()
          , n = 127 & e;
        if (n == e)
            return n;
        if (n > 6)
            throw new Error("Length over 48 bits not supported at position " + (t.pos - 1));
        if (0 === n)
            return null;
        e = 0;
        for (var o = 0; o < n; ++o)
            e = 256 * e + t.get();
        return e
    }
    ,
    t.prototype.getHexStringValue = function() {
        var t = this.toHexString()
          , e = 2 * this.header
          , n = 2 * this.length;
        return t.substr(e, n)
    }
    ,
    t.decode = function(e) {
        var n;
        n = e instanceof Xv ? e : new Xv(e,0);
        var o = new Xv(n)
          , i = new Gv(n)
          , r = t.decodeLength(n)
          , s = n.pos
          , a = s - o.pos
          , l = null
          , u = function() {
            var e = [];
            if (null !== r) {
                for (var o = s + r; n.pos < o; )
                    e[e.length] = t.decode(n);
                if (n.pos != o)
                    throw new Error("Content size is not correct for container starting at offset " + s)
            } else
                try {
                    for (; ; ) {
                        var i = t.decode(n);
                        if (i.tag.isEOC())
                            break;
                        e[e.length] = i
                    }
                    r = s - n.pos
                } catch (a) {
                    throw new Error("Exception while decoding undefined length content: " + a)
                }
            return e
        };
        if (i.tagConstructed)
            l = u();
        else if (i.isUniversal() && (3 == i.tagNumber || 4 == i.tagNumber))
            try {
                if (3 == i.tagNumber && 0 != n.get())
                    throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
                l = u();
                for (var c = 0; c < l.length; ++c)
                    if (l[c].tag.isEOC())
                        throw new Error("EOC is not supposed to be actual content.")
            } catch (h) {
                l = null
            }
        if (null === l) {
            if (null === r)
                throw new Error("We can't skip over an invalid tag with undefined length at offset " + s);
            n.pos = s + Math.abs(r)
        }
        return new t(o,a,r,i,l)
    }
    ,
    t
}()
var Vv, jv = function(t) {
    var e;
    if (void 0 === Rv) {
        var n = "0123456789ABCDEF"
          , o = " \f\n\r\t \u2028\u2029";
        for (Rv = {},
        e = 0; e < 16; ++e)
            Rv[n.charAt(e)] = e;
        for (n = n.toLowerCase(),
        e = 10; e < 16; ++e)
            Rv[n.charAt(e)] = e;
        for (e = 0; e < o.length; ++e)
            Rv[o.charAt(e)] = -1
    }
    var i = []
      , r = 0
      , s = 0;
    for (e = 0; e < t.length; ++e) {
        var a = t.charAt(e);
        if ("=" == a)
            break;
        if (-1 != (a = Rv[a])) {
            if (void 0 === a)
                throw new Error("Illegal character at offset " + e);
            r |= a,
            ++s >= 2 ? (i[i.length] = r,
            r = 0,
            s = 0) : r <<= 4
        }
    }
    if (s)
        throw new Error("Hex encoding incomplete: 4 bits missing");
    return i
}
Gv = function() {
    function t(t) {
        var e = t.get();
        if (this.tagClass = e >> 6,
        this.tagConstructed = 0 != (32 & e),
        this.tagNumber = 31 & e,
        31 == this.tagNumber) {
            var n = new qv;
            do {
                e = t.get(),
                n.mulAdd(128, 127 & e)
            } while (128 & e);
            this.tagNumber = n.simplify()
        }
    }
    return t.prototype.isUniversal = function() {
        return 0 === this.tagClass
    }
    ,
    t.prototype.isEOC = function() {
        return 0 === this.tagClass && 0 === this.tagNumber
    }
    ,
    t
}()
var Fv = {
    decode: function(t) {
        var e;
        if (void 0 === Vv) {
            var n = "= \f\n\r\t \u2028\u2029";
            for (Vv = Object.create(null),
            e = 0; e < 64; ++e)
                Vv["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)] = e;
            for (Vv["-"] = 62,
            Vv._ = 63,
            e = 0; e < n.length; ++e)
                Vv[n.charAt(e)] = -1
        }
        var o = []
          , i = 0
          , r = 0;
        for (e = 0; e < t.length; ++e) {
            var s = t.charAt(e);
            if ("=" == s)
                break;
            if (-1 != (s = Vv[s])) {
                if (void 0 === s)
                    throw new Error("Illegal character at offset " + e);
                i |= s,
                ++r >= 4 ? (o[o.length] = i >> 16,
                o[o.length] = i >> 8 & 255,
                o[o.length] = 255 & i,
                i = 0,
                r = 0) : i <<= 6
            }
        }
        switch (r) {
        case 1:
            throw new Error("Base64 encoding incomplete: at least 2 bits missing");
        case 2:
            o[o.length] = i >> 10;
            break;
        case 3:
            o[o.length] = i >> 16,
            o[o.length] = i >> 8 & 255
        }
        return o
    },
    re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
    unarmor: function(t) {
        var e = Fv.re.exec(t);
        if (e)
            if (e[1])
                t = e[1];
            else {
                if (!e[2])
                    throw new Error("RegExp out of sync");
                t = e[2]
            }
        return Fv.decode(t)
    }
}
Ey = function (t) {
    function e(n) {
        var o = t.call(this) || this;
        return n && ("string" == typeof n ? o.parseKey(n) : (e.hasPrivateKeyProperty(n) || e.hasPublicKeyProperty(n)) && o.parsePropertiesFrom(n)),
            o
    }

    return Ty(e, t),
        e.prototype.parseKey = function (t) {
            try {
                var e = 0
                    , n = 0
                    , o = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t) ? jv(t) : Fv.unarmor(t)
                    , i = Kv.decode(o);
                if (3 === i.sub.length && (i = i.sub[2].sub[0]),
                9 === i.sub.length) {
                    e = i.sub[1].getHexStringValue(),
                        this.n = ry(e, 16),
                        n = i.sub[2].getHexStringValue(),
                        this.e = parseInt(n, 16);
                    var r = i.sub[3].getHexStringValue();
                    this.d = ry(r, 16);
                    var s = i.sub[4].getHexStringValue();
                    this.p = ry(s, 16);
                    var a = i.sub[5].getHexStringValue();
                    this.q = ry(a, 16);
                    var l = i.sub[6].getHexStringValue();
                    this.dmp1 = ry(l, 16);
                    var u = i.sub[7].getHexStringValue();
                    this.dmq1 = ry(u, 16);
                    var c = i.sub[8].getHexStringValue();
                    this.coeff = ry(c, 16)
                } else {
                    if (2 !== i.sub.length)
                        return !1;
                    var h = i.sub[1].sub[0];
                    e = h.sub[0].getHexStringValue(),
                        this.n = ry(e, 16),
                        n = h.sub[1].getHexStringValue(),
                        this.e = parseInt(n, 16)
                }
                return !0
            } catch (f) {
                return !1
            }
        }
        ,
        e.prototype.getPrivateBaseKey = function () {
            var t = {
                array: [new xy.asn1.DERInteger({
                    int: 0
                }), new xy.asn1.DERInteger({
                    bigint: this.n
                }), new xy.asn1.DERInteger({
                    int: this.e
                }), new xy.asn1.DERInteger({
                    bigint: this.d
                }), new xy.asn1.DERInteger({
                    bigint: this.p
                }), new xy.asn1.DERInteger({
                    bigint: this.q
                }), new xy.asn1.DERInteger({
                    bigint: this.dmp1
                }), new xy.asn1.DERInteger({
                    bigint: this.dmq1
                }), new xy.asn1.DERInteger({
                    bigint: this.coeff
                })]
            };
            return new xy.asn1.DERSequence(t).getEncodedHex()
        }
        ,
        e.prototype.getPrivateBaseKeyB64 = function () {
            return Nv(this.getPrivateBaseKey())
        }
        ,
        e.prototype.getPublicBaseKey = function () {
            var t = new xy.asn1.DERSequence({
                array: [new xy.asn1.DERObjectIdentifier({
                    oid: "1.2.840.113549.1.1.1"
                }), new xy.asn1.DERNull]
            })
                , e = new xy.asn1.DERSequence({
                array: [new xy.asn1.DERInteger({
                    bigint: this.n
                }), new xy.asn1.DERInteger({
                    int: this.e
                })]
            })
                , n = new xy.asn1.DERBitString({
                hex: "00" + e.getEncodedHex()
            });
            return new xy.asn1.DERSequence({
                array: [t, n]
            }).getEncodedHex()
        }
        ,
        e.prototype.getPublicBaseKeyB64 = function () {
            return Nv(this.getPublicBaseKey())
        }
        ,
        e.wordwrap = function (t, e) {
            if (!t)
                return t;
            var n = "(.{1," + (e = e || 64) + "})( +|$\n?)|(.{1," + e + "})";
            return t.match(RegExp(n, "g")).join("\n")
        }
        ,
        e.prototype.getPrivateKey = function () {
            var t = "-----BEGIN RSA PRIVATE KEY-----\n";
            return t += e.wordwrap(this.getPrivateBaseKeyB64()) + "\n",
                t += "-----END RSA PRIVATE KEY-----"
        }
        ,
        e.prototype.getPublicKey = function () {
            var t = "-----BEGIN PUBLIC KEY-----\n";
            return t += e.wordwrap(this.getPublicBaseKeyB64()) + "\n",
                t += "-----END PUBLIC KEY-----"
        }
        ,
        e.hasPublicKeyProperty = function (t) {
            return (t = t || {}).hasOwnProperty("n") && t.hasOwnProperty("e")
        }
        ,
        e.hasPrivateKeyProperty = function (t) {
            return (t = t || {}).hasOwnProperty("n") && t.hasOwnProperty("e") && t.hasOwnProperty("d") && t.hasOwnProperty("p") && t.hasOwnProperty("q") && t.hasOwnProperty("dmp1") && t.hasOwnProperty("dmq1") && t.hasOwnProperty("coeff")
        }
        ,
        e.prototype.parsePropertiesFrom = function (t) {
            this.n = t.n,
                this.e = t.e,
            t.hasOwnProperty("d") && (this.d = t.d,
                this.p = t.p,
                this.q = t.q,
                this.dmp1 = t.dmp1,
                this.dmq1 = t.dmq1,
                this.coeff = t.coeff)
        }
        ,
        e
}(by);
var ky = function () {
    function t(t) {
        void 0 === t && (t = {}),
            t = t || {},
            this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024,
            this.default_public_exponent = t.default_public_exponent || "010001",
            this.log = t.log || !1,
            this.key = null
    }

    return t.prototype.setKey = function (t) {
        this.log && this.key && console.warn("A key was already set, overriding existing."),
            this.key = new Ey(t)
    }
        ,
        t.prototype.setPrivateKey = function (t) {
            this.setKey(t)
        }
        ,
        t.prototype.setPublicKey = function (t) {
            this.setKey(t)
        }
        ,
        t.prototype.decrypt = function (t) {
            try {
                return this.getKey().decrypt($v(t))
            } catch (e) {
                return !1
            }
        }
        ,
        t.prototype.encrypt = function (t) {
            try {
                return Nv(this.getKey().encrypt(t))
            } catch (e) {
                return !1
            }
        }
        ,
        t.prototype.encryptLong = function (t) {
            try {
                return Nv(this.getKey().encryptLong(t))
            } catch (e) {
                return !1
            }
        }
        ,
        t.prototype.decryptLong = function (t) {
            try {
                return this.getKey().decryptLong($v(t))
            } catch (e) {
                return !1
            }
        }
        ,
        t.prototype.sign = function (t, e, n) {
            try {
                return Nv(this.getKey().sign(t, e, n))
            } catch (o) {
                return !1
            }
        }
        ,
        t.prototype.verify = function (t, e, n) {
            try {
                return this.getKey().verify(t, $v(e), n)
            } catch (o) {
                return !1
            }
        }
        ,
        t.prototype.getKey = function (t) {
            if (!this.key) {
                if (this.key = new Ey,
                t && "[object Function]" === {}.toString.call(t))
                    return void this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
                this.key.generate(this.default_key_size, this.default_public_exponent)
            }
            return this.key
        }
        ,
        t.prototype.getPrivateKey = function () {
            return this.getKey().getPrivateKey()
        }
        ,
        t.prototype.getPrivateKeyB64 = function () {
            return this.getKey().getPrivateBaseKeyB64()
        }
        ,
        t.prototype.getPublicKey = function () {
            return this.getKey().getPublicKey()
        }
        ,
        t.prototype.getPublicKeyB64 = function () {
            return this.getKey().getPublicBaseKeyB64()
        }
        ,
        t.version = Cy,
        t
}();
getRsaCode = function (t) {
    const e = new ky;
    return e.setPublicKey("\n  -----BEGIN PUBLIC KEY-----\n  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqDDnTM50OQEqUnnnsFQUEFS819exMN2fX7GOHtXx4F3FAn9tByi2oSMuwzlYJJKB6zZZ6tZVTm+CxMx9bnAgUeHTdr+1VRCAK4bvrcMCeY6quC8C927CaDV6WceVjKH7d4qeffSak58czIboTD650CihCJ7mT/ffyVPCcMMMQams+jbniVE/4C0CqftV0aH0eugVrk9KRlUOR9VJH4nlCgoditeiTA83IuHcHnINWfpfKN6gM0GUFOwMYUYBdoPs8Hz2oo7dAFcxdYVwwiYHUG4rdoxAMyleRgVkkI0jpKlETgye+7bvJdaRf1VFGDcKCRAVfIGsriZoKUC33rCMKwIDAQAB\n  -----END PUBLIC KEY-----\n"),
        e.encryptLong(t)
}